<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- 
	Copyright (C) 2007, 2008, 2009, 2010, 2011. PARP Research Group.
	<http://perception.inf.um.es>
	University of Murcia, Spain.

	This file is part of the QVision library.

	QVision is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as
	published by the Free Software Foundation, version 3 of the License.

	QVision is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with QVision. If not, see <http://www.gnu.org/licenses/>.
-->

<html><head><meta http-equiv="content-Type" content="text/html;charset=UTF-8">
<title>QVision: Qt&#39;s Image, Video and Computer Vision Library</title>
<meta name="title" content="QVision" />
<meta name="dc.title" content="QVision" />
<meta name="url" content="http://perception.inf.um.es/QVision" />
<meta name="author" content="PARP Research Group - http://perception.inf.um.es" />
<meta name="revisit-after" content="30 DAYS"/>
<meta name="robots" content="index,follow"/>
<meta name="classification" content="*">
<meta name="rating" content="Safe For Kids">
<meta name="distribution" content="GLOBAL"/>
<meta name="description" content="Qt's Image, Video and Computer Vision Library"/>
<meta name="page-topic" content="Computer Vision research and prototype programming"/>
<meta name="geo.country" content="ES" />

<!--
Keywords:
By license:		open source, gnu, lgpl, gpl, free
By theme:		computer vision, image processing, robotics, programming, source, development
By usage:		library, toolkit, framework, prototype, application
By programming specs:	object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping
Interoperability with:	Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack
Functionallity:		image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface
Main data-types:	matrix, vector, tensor, quaternion, image, polyline
Video sources:		webcam, camera, stream
Devices:		embedded, desktop computer, laptop, mini-laptop
Authors:		PARP research group. University of Murcia, Spain.
-->

<meta name="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="title" content="QVision"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
</head><body>

<table width="100%"><tr>
	<td><a href="http://perception.inf.um.es/"><img src="parp.png" border="0" /> <big>PARP Research Group</big></a></td>
	<td align="right"><a href="http://www.um.es/"><big>Universidad de Murcia</big> <img src="um.png" border="0" /></a></td>
</tr></table>

<hr /><br />

<table width="95%" align="center"><tr><td>

<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <form id="FSearchBox" action="search.php" method="get">
            <img id="MSearchSelect" src="search/search.png" alt=""/>
            <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                   onfocus="searchBox.OnSearchFieldFocus(true)" 
                   onblur="searchBox.OnSearchFieldFocus(false)"/>
          </form>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>src/qvblockprogramming/qvprocessingblock.h</h1><a href="qvprocessingblock_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> *      Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012. PARP Research Group.</span>
<a name="l00003"></a>00003 <span class="comment"> *      &lt;http://perception.inf.um.es&gt;</span>
<a name="l00004"></a>00004 <span class="comment"> *      University of Murcia, Spain.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> *      This file is part of the QVision library.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> *      QVision is free software: you can redistribute it and/or modify</span>
<a name="l00009"></a>00009 <span class="comment"> *      it under the terms of the GNU Lesser General Public License as</span>
<a name="l00010"></a>00010 <span class="comment"> *      published by the Free Software Foundation, version 3 of the License.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> *      QVision is distributed in the hope that it will be useful,</span>
<a name="l00013"></a>00013 <span class="comment"> *      but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00015"></a>00015 <span class="comment"> *      GNU Lesser General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> *      You should have received a copy of the GNU Lesser General Public</span>
<a name="l00018"></a>00018 <span class="comment"> *      License along with QVision. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef QVPROCESSINGBLOCK_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define QVPROCESSINGBLOCK_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;QStringList&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;QThread&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;QTime&gt;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="qvcpustatcontroler_8h.html" title="File from the QVision library.">qvblockprogramming/qvcpustatcontroler.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;QVPropertyContainer&gt;</span>
<a name="l00034"></a>00034 
<a name="l00045"></a><a class="code" href="classQVProcessingBlock.html">00045</a> <span class="keyword">class </span><a class="code" href="classQVProcessingBlock.html" title="Base class for Block threads.">QVProcessingBlock</a>: <span class="keyword">public</span> QThread, <span class="keyword">public</span> <a class="code" href="classQVPropertyContainer.html" title="Base class for dynamic property container objects.">QVPropertyContainer</a>
<a name="l00046"></a>00046     {
<a name="l00047"></a>00047     Q_OBJECT
<a name="l00048"></a>00048 
<a name="l00049"></a>00049     <span class="keyword">public</span>:
<a name="l00051"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5">00051</a>         <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00052"></a>00052             {
<a name="l00056"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a5252ef1bbe4bd07e1fa66c7cf1f27d0e">00056</a>             <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a5252ef1bbe4bd07e1fa66c7cf1f27d0e">Running</a>,
<a name="l00059"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5af2ff917aa66dc170044ea731082c50d7">00059</a>             <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5af2ff917aa66dc170044ea731082c50d7">RunningOneStep</a>,
<a name="l00063"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a00db081e1975c5fe7b2896d0e3b9c2f7">00063</a>             <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a00db081e1975c5fe7b2896d0e3b9c2f7">Paused</a>,
<a name="l00067"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a598549c56ecfbe02fbc7a71825bde564">00067</a>             <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a598549c56ecfbe02fbc7a71825bde564">Stopped</a>,
<a name="l00069"></a><a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a24d46237cabfd686cbdb35b20b193baa">00069</a>             <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a24d46237cabfd686cbdb35b20b193baa" title="Block is finished. Execution thread ended.">Finished</a>
<a name="l00070"></a>00070             } <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5" title="Different states in which a block object can be.">TBlockStatus</a>;
<a name="l00071"></a>00071 
<a name="l00076"></a>00076         <a class="code" href="classQVProcessingBlock.html#a68ff2767d04f952f5654514145bb32d8" title="Constructor for QVProcessingBlock class.">QVProcessingBlock</a>(<span class="keyword">const</span> QString name = QString());
<a name="l00077"></a>00077 
<a name="l00082"></a>00082         <a class="code" href="classQVProcessingBlock.html#a68ff2767d04f952f5654514145bb32d8" title="Constructor for QVProcessingBlock class.">QVProcessingBlock</a>(<span class="keyword">const</span> <a class="code" href="classQVProcessingBlock.html" title="Base class for Block threads.">QVProcessingBlock</a> &amp;other);
<a name="l00083"></a>00083 
<a name="l00085"></a>00085         <a class="code" href="classQVProcessingBlock.html#aefcffc7b413c1640f4c1f0f245736f2d" title="Destructor for QVProcessingBlock class.">~QVProcessingBlock</a>();
<a name="l00086"></a>00086 
<a name="l00091"></a><a class="code" href="classQVProcessingBlock.html#a0283c799776e0c938538de0b0ae6b463">00091</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a0283c799776e0c938538de0b0ae6b463" title="Function to be defined in subclasses with processing code.">iterate</a>() { };
<a name="l00092"></a>00092 
<a name="l00104"></a><a class="code" href="classQVProcessingBlock.html#a511e811818f28903b60631a550f86b55">00104</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a511e811818f28903b60631a550f86b55" title="Sets a minimum ms delay for each iteration (default is 0).">setMinimumDelay</a>(<span class="keywordtype">int</span> ms) { minms = ms; };
<a name="l00105"></a>00105 
<a name="l00108"></a><a class="code" href="classQVProcessingBlock.html#aba2598b540740b3836d431836efd5d6d">00108</a>         <span class="keywordtype">bool</span> <a class="code" href="classQVProcessingBlock.html#aba2598b540740b3836d431836efd5d6d" title="Function that can be used to check finish status of block.">isFinished</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> status == <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a24d46237cabfd686cbdb35b20b193baa" title="Block is finished. Execution thread ended.">Finished</a>; }
<a name="l00109"></a>00109 
<a name="l00112"></a><a class="code" href="classQVProcessingBlock.html#a794e129d5ad9d8356a9d5c363cfda4b1">00112</a>         <span class="keywordtype">bool</span> <a class="code" href="classQVProcessingBlock.html#a794e129d5ad9d8356a9d5c363cfda4b1" title="Function that can be used to check paused status of block.">isPaused</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> status == <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a00db081e1975c5fe7b2896d0e3b9c2f7">Paused</a>; }
<a name="l00113"></a>00113 
<a name="l00116"></a><a class="code" href="classQVProcessingBlock.html#ae01629a378633a1a029e02fc2fd483b6">00116</a>         <span class="keywordtype">bool</span> <a class="code" href="classQVProcessingBlock.html#ae01629a378633a1a029e02fc2fd483b6" title="Function that can be used to check stopped status of block.">isStopped</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> status == <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a598549c56ecfbe02fbc7a71825bde564">Stopped</a>; }
<a name="l00117"></a>00117 
<a name="l00120"></a><a class="code" href="classQVProcessingBlock.html#a386b50b1697d0404a9dc56e337ed4fb0">00120</a>         <span class="keywordtype">bool</span> <a class="code" href="classQVProcessingBlock.html#a386b50b1697d0404a9dc56e337ed4fb0" title="Function that can be used to check running status of block.">isRunning</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> status == <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a5252ef1bbe4bd07e1fa66c7cf1f27d0e">Running</a>; }
<a name="l00121"></a>00121 
<a name="l00124"></a><a class="code" href="classQVProcessingBlock.html#a37bbb1533327b59c24daa736d7de67e3">00124</a>         <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5" title="Different states in which a block object can be.">TBlockStatus</a> <a class="code" href="classQVProcessingBlock.html#a37bbb1533327b59c24daa736d7de67e3" title="Function to obtain the status of the block.">getStatus</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> status; }
<a name="l00125"></a>00125 
<a name="l00128"></a><a class="code" href="classQVProcessingBlock.html#a95c56bae078a84bf689b7ee8073bcf7c">00128</a>         <span class="keywordtype">int</span> <a class="code" href="classQVProcessingBlock.html#a95c56bae078a84bf689b7ee8073bcf7c" title="Function to obtain the number of iteration the block has performed.">getIteration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> numIterations; }
<a name="l00129"></a>00129 
<a name="l00132"></a><a class="code" href="classQVProcessingBlock.html#aea1b1735900c3fccdbe183cc335504cf">00132</a>         <span class="keywordtype">bool</span> <a class="code" href="classQVProcessingBlock.html#aea1b1735900c3fccdbe183cc335504cf" title="Function to obtain if the stats are enabled.">isStatsEnabled</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> statsEnabled; }
<a name="l00133"></a>00133 
<a name="l00144"></a><a class="code" href="classQVProcessingBlock.html#aca59123fcdd242d3c7a867cfc942d1bb">00144</a>         QVStat <a class="code" href="classQVProcessingBlock.html#aca59123fcdd242d3c7a867cfc942d1bb" title="Gets CpuStat object for the block.">getCpuStat</a>()<span class="keyword"> const </span>{
<a name="l00145"></a>00145             <span class="keywordflow">if</span> (statsEnabled) <span class="keywordflow">return</span> cpuStatControler-&gt;value();
<a name="l00146"></a>00146             <span class="keywordflow">else</span> <span class="keywordflow">return</span> QVStat();
<a name="l00147"></a>00147         }
<a name="l00148"></a>00148 
<a name="l00156"></a><a class="code" href="classQVProcessingBlock.html#af9896015375318688fb78012a08cddfb">00156</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#af9896015375318688fb78012a08cddfb" title="Prints CpuStat object for the block.">setPrintStatsFrequency</a>(<span class="keywordtype">int</span> freq)
<a name="l00157"></a>00157             {
<a name="l00158"></a>00158             <span class="keywordflow">if</span> (statsEnabled)
<a name="l00159"></a>00159                 {
<a name="l00160"></a>00160                 cpuStatControler-&gt;setFreq(freq);
<a name="l00161"></a>00161                 cpuStatControler-&gt;setBlockName(<a class="code" href="classQVPropertyContainer.html#a82e880a6c160f3780bc8f7b822fbbd85" title="Retrieves identifier QString of the object.">getName</a>());
<a name="l00162"></a>00162                 }
<a name="l00163"></a>00163             }
<a name="l00164"></a>00164 
<a name="l00171"></a><a class="code" href="classQVProcessingBlock.html#a762e6a292423b4ab842fe6e858550262">00171</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a762e6a292423b4ab842fe6e858550262" title="Prints CpuStat object for the block.">printStats</a>()
<a name="l00172"></a>00172             {
<a name="l00173"></a>00173             <span class="keywordflow">if</span> (statsEnabled)
<a name="l00174"></a>00174                 cpuStatControler-&gt;printStats();
<a name="l00175"></a>00175             }
<a name="l00176"></a>00176 
<a name="l00195"></a><a class="code" href="classQVProcessingBlock.html#a26a8c3ab6758620d7cb328f4dd60b860">00195</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a26a8c3ab6758620d7cb328f4dd60b860" title="Adds a trigger to the block.">addTrigger</a>(QString name)                   { triggerList.push_back(name); }
<a name="l00196"></a>00196 
<a name="l00198"></a><a class="code" href="classQVProcessingBlock.html#addab1a41d0a9e7bbdfe47f8b81283ffc">00198</a>         <span class="keyword">const</span> QStringList <a class="code" href="classQVProcessingBlock.html#addab1a41d0a9e7bbdfe47f8b81283ffc" title="Returns the list of triggers (as a QStringList) for the block.">getTriggerList</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> triggerList; }
<a name="l00199"></a>00199 
<a name="l00212"></a><a class="code" href="classQVProcessingBlock.html#a61f390e8790a77175a6d6e1049a9d127">00212</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a61f390e8790a77175a6d6e1049a9d127" title="Stablish a performance breakpoint in the execution of the block.">timeFlag</a>(<span class="keyword">const</span> QString flag)
<a name="l00213"></a>00213             {
<a name="l00214"></a>00214             qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::timeFlag(&quot;</span>&lt;&lt; flag &lt;&lt;<span class="stringliteral">&quot;)&quot;</span>;
<a name="l00215"></a>00215             <span class="keywordflow">if</span> (statsEnabled) cpuStatControler-&gt;setFlag(flag);
<a name="l00216"></a>00216             }
<a name="l00217"></a>00217 
<a name="l00218"></a>00218     <span class="keyword">public</span> slots:
<a name="l00221"></a><a class="code" href="classQVProcessingBlock.html#a4f5ffa9798933d22a8959bf95d5ce6c7">00221</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a4f5ffa9798933d22a8959bf95d5ce6c7" title="Set block status to QVProcessingBlock::Paused.">pause</a>() { qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::pause()&quot;</span>; status = <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a00db081e1975c5fe7b2896d0e3b9c2f7">Paused</a>; emit <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(status); }
<a name="l00222"></a>00222 
<a name="l00225"></a><a class="code" href="classQVProcessingBlock.html#a8ba2deff4679f67891e0aafe2a1d1c14">00225</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a8ba2deff4679f67891e0aafe2a1d1c14" title="Set block status to QVProcessingBlock::Running.">unPause</a>() { qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::unPause()&quot;</span>; status = <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a5252ef1bbe4bd07e1fa66c7cf1f27d0e">Running</a>; emit <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(status); }
<a name="l00226"></a>00226 
<a name="l00229"></a><a class="code" href="classQVProcessingBlock.html#a3f4dd477633e707ec876aa5f8677d18c">00229</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a3f4dd477633e707ec876aa5f8677d18c" title="Set block status to QVProcessingBlock::RunningOneStep.">step</a>() { qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::step()&quot;</span>; status = <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5af2ff917aa66dc170044ea731082c50d7">RunningOneStep</a>; emit <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(status); }
<a name="l00230"></a>00230 
<a name="l00233"></a><a class="code" href="classQVProcessingBlock.html#ace1cb7c1c822c3f4b32782528a3b9a99">00233</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#ace1cb7c1c822c3f4b32782528a3b9a99" title="Finish block execution.">stop</a>() { qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::stop()&quot;</span>; status = <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a598549c56ecfbe02fbc7a71825bde564">Stopped</a>; emit <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(status); }
<a name="l00234"></a>00234 
<a name="l00237"></a><a class="code" href="classQVProcessingBlock.html#afacc54ae592d0b6da15476b6b9238499">00237</a>         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#afacc54ae592d0b6da15476b6b9238499" title="Finish block execution.">finish</a>() { qDebug() &lt;&lt; <span class="stringliteral">&quot;QVProcessingBlock::finish()&quot;</span>; status = <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5a24d46237cabfd686cbdb35b20b193baa" title="Block is finished. Execution thread ended.">Finished</a>; emit <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(status); }
<a name="l00238"></a>00238 
<a name="l00253"></a><a class="code" href="classQVProcessingBlock.html#adb13844954356bd9ed1bfbe97d731095">00253</a>         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#adb13844954356bd9ed1bfbe97d731095" title="Process trigger activations in the block.">processTrigger</a>(<span class="keyword">const</span> QString name) { Q_UNUSED(name); }
<a name="l00254"></a>00254 
<a name="l00255"></a>00255     signals:
<a name="l00258"></a>00258         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a2be02b18fe1e03a2dd3a51b589e61f69" title="Signal emited before each call to QVProcessingBlock::iterate() function.">startIteration</a>();
<a name="l00259"></a>00259 
<a name="l00262"></a>00262         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#a1924b55e68860c62099885a8700ef7ab" title="Signal emited after each call to QVProcessingBlock::iterate() function.">endIteration</a>(uint <span class="keywordtype">id</span>, <span class="keywordtype">int</span> iteration);
<a name="l00263"></a>00263 
<a name="l00266"></a>00266         <span class="keywordtype">void</span> <a class="code" href="classQVProcessingBlock.html#af6d73eb86583ac05cc86e9dcd2da4f19" title="Signal emited when block changes its status.">statusUpdate</a>(<a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5" title="Different states in which a block object can be.">QVProcessingBlock::TBlockStatus</a>);
<a name="l00267"></a>00267 
<a name="l00268"></a>00268     <span class="keyword">private</span>:
<a name="l00269"></a>00269         <span class="keywordtype">bool</span> statsEnabled;
<a name="l00270"></a>00270         QVStatControler *cpuStatControler;
<a name="l00271"></a>00271         <span class="keywordtype">int</span> numIterations, maxIterations;
<a name="l00272"></a>00272         <a class="code" href="classQVProcessingBlock.html#a1a629009a666814593cd3f50198b24c5" title="Different states in which a block object can be.">TBlockStatus</a> status;
<a name="l00273"></a>00273         QStringList triggerList;
<a name="l00274"></a>00274         QTime iterationTime;
<a name="l00275"></a>00275         <span class="keywordtype">int</span> curms,minms;
<a name="l00276"></a>00276 
<a name="l00277"></a>00277     <span class="keyword">protected</span>:
<a name="l00278"></a>00278         <span class="keywordtype">void</span> run();
<a name="l00279"></a>00279         <span class="keywordtype">void</span> blockIterate();
<a name="l00280"></a>00280     };
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 Q_DECLARE_METATYPE(QVStat);
<a name="l00283"></a>00283 <span class="preprocessor">#endif</span>
</pre></div></div>
</td></tr></table>

<br /><hr><br />
<center><a href="http://perception.inf.um.es/QVision">QVision framework</a>.
<a href="http://perception.inf.um.es">PARP research group</a>.
Copyright &copy; 2007, 2008, 2009, 2010, 2011.</center>
<br />
</body>
</html>
